﻿
using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Oliving.Edge.Model.Dto
{
    ///<summary>
    ///通道
    ///</summary>  
    [Serializable]
    public class DTSN_TongDaoPageDto
    {
        public DTSN_TongDaoPageDto()
        {
        }

        /// <summary> 
        /// Desc:通道 
        /// Default: 
        /// Nullable:False 
        /// </summary> 

        public int TD_ID { get; set; }

        /// <summary> 
        /// Desc:通道名称 
        /// Default: 
        /// Nullable:True 
        /// </summary> 
        [StringLength(100, MinimumLength = 1, ErrorMessage = "通道名称不能为空,内存长度超出 范围")]
        public string TD_Name { get; set; }

        /// <summary> 
        /// Desc:通道代码 
        /// Default: 
        /// Nullable:True 
        /// </summary> 
        [StringLength(100, MinimumLength = 1, ErrorMessage = "通道代码不能为空,内存长度超出 范围")]
        public string TD_Code { get; set; }

        /// <summary> 
        /// Desc:备注 
        /// Default: 
        /// Nullable:True 
        /// </summary> 
        [StringLength(1000, MinimumLength = 1, ErrorMessage = "备注不能为空,内存长度超出 范围")]
        public string TD_Remark { get; set; }

        /// <summary> 
        /// Desc:创建时间 
        /// Default: 
        /// Nullable:True 
        /// </summary> 
        private string _TD_CreateTime;
        public string TD_CreateTime // { get; set; }
        {
            set { this._TD_CreateTime = value; }
            get
            {
                DateTime result;
                bool isDateTime = DateTime.TryParse(this._TD_CreateTime, out result);
                if (isDateTime) { return result.ToString("yyyy-MM-dd"); }
                else
                { return ""; }


            }



        }

        /// <summary> 
        /// Desc:配型 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        public int? TD_Type { get; set; }

        /// <summary> 
        /// Desc:状态 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        public int? TD_State { get; set; }


        public string StateText
        {
            get
            {
                return (TD_State ?? 0) == 0 ? "正常" : "已删除";
            }
        }

        /// <summary> 
        /// Desc:物料名称 
        /// Default: 
        /// Nullable:True 
        /// </summary> 
        [StringLength(100, MinimumLength = 1, ErrorMessage = "物料名称不能为空,内存长度超出 范围")]
        public string TD_WuLiao { get; set; }

        /// <summary> 
        /// Desc:物料代码 
        /// Default: 
        /// Nullable:True 
        /// </summary> 
        [StringLength(100, MinimumLength = 1, ErrorMessage = "物料代码不能为空,内存长度超出 范围")]
        public string TD_WuLiaoCode { get; set; }

        /// <summary> 
        /// Desc:重量 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        public decimal? TD_Weight { get; set; }

        /// <summary> 
        /// Desc:重量 
        /// Default: 
        /// Nullable:True 
        /// </summary> 

        public decimal? TD_WeightA { get; set; }

        /// <summary>
        ///  上位机
        /// </summary>
        public string SWJ_Name { get; set; }


        public string TD_ReadCardIP { get; set; }



    }

}
